package com.zx.cloud.controller.client;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.multipart.MultipartFile;

import com.zx.cloud.ApiVersion;
import com.zx.cloud.common.qiniu.FileType;
import com.zx.cloud.model.response.ObjectDataResponse;

import feign.Headers;

/**
 * @author Alex
 */
@FeignClient(name = FileClient.SERVICE_ID, fallback = FileClientFallback.class)
public interface FileClient {

	/**
	 * eureka service name
	 */
	String SERVICE_ID = "trade-provider";

	@Headers("X-Auth-Token:{X-Auth-Token}")
	@RequestMapping(value = ApiVersion.PROVIDER_V1_PREFIX + "/file/upload", method = RequestMethod.POST)
	ObjectDataResponse<String> upload(MultipartFile file , FileType fileType);


}
